Skip to content

config: inject Bearer token on config.fetch#2520

Merged
r-vasquez merged 1 commit into
masterfrom
add-bearer
Jun 19, 2026
Merged

config: inject Bearer token on config.fetch#2520
r-vasquez merged 1 commit into
masterfrom
add-bearer

Conversation

@r-vasquez

Copy link
Copy Markdown
Contributor

REST helpers that call config.fetch directly,
rather than going through the rest() wrapper,
sent no Authorization header. Under Module
Federation v2 the Cloud UI host hands Console the
access token via config.jwt instead of a
pre-authenticated fetch, so those requests went
out unauthenticated.

Wrap the base fetch so every config.fetch call
attaches the same Bearer token the gRPC
interceptor uses. The token is read lazily so
in-place host refreshes are picked up, and an
Authorization header already set by a legacy
host-provided (V1) fetch is left untouched.

REST helpers that call config.fetch directly,
rather than going through the rest<T>() wrapper,
sent no Authorization header. Under Module
Federation v2 the Cloud UI host hands Console the
access token via config.jwt instead of a
pre-authenticated fetch, so those requests went
out unauthenticated.

Wrap the base fetch so every config.fetch call
attaches the same Bearer token the gRPC
interceptor uses. The token is read lazily so
in-place host refreshes are picked up, and an
Authorization header already set by a legacy
host-provided (V1) fetch is left untouched.

@Mateoc Mateoc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@r-vasquez r-vasquez merged commit 9291a09 into master Jun 19, 2026
17 checks passed
@r-vasquez r-vasquez deleted the add-bearer branch June 19, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants